#!/usr/bin/env bash

if [ $# = 0 -o $# -gt 2 ]; then
    echo -e "
Usage:
    dc-conf imgName/ctnName [keyword]
"
   exit 1
fi

# 1 个参数，所有配置
if [ $# = 1 ]; then
    docker inspect $1
    exit 0
fi

# 2 个参数，过滤指定的配置
docker inspect $1 | grep --color=auto -i $2
